<template lang="">
  <div class="mypack-warp">
    <div class="page">
      <mine-header>{{title}}</mine-header>
      <!-- 余额 -->
        <div class="show">
          <div class="balance">
            <p class="totality">总余额 <span>提现</span></p> 
          </div>
            <span class="num">120.0</span>
          <div class="operation">
            <div class="operationitem">
               <li>0.00 </li>
               <span> 可提现余额</span>
            </div>
            <div class="operationitem btnbor">
               <li>0.00 </li>
               <span> 可提现余额</span>
            </div>
            <div class="operationitem">
               <li>0.00 </li>
               <span> 可提现余额</span>
            </div>
          </div>
        </div>
        <!-- 收入、支出 -->
        <div class="navbar">
            <li :class="{active:currentClass==item.id}" v-for="item in select" :key="item.id"
            @click="selectAction(item.id)"
            >{{item.title}}</li>
        </div>
          <!-- 组件 -->
         <com :comId="currentClass"/>
      
    </div>
  </div>
</template>
<script>
import MineHeader from "@/views/Mine/com/mine-header.vue"
import MyPackCom from '../mypack/com.vue'
export default {
  name: "mypack",
  components: {
    [MineHeader.name]:MineHeader,
    [MyPackCom.name]:MyPackCom
  },
  data() {
    return {
      title: "我的钱包",
      select: [
        {
          id:1,
          title:"收入",
        },
        {
        id:2,
          title:"支出"
        }
      ],
      currentClass: 1,
    }
  },
  methods: {
    selectAction(id) {
      this.currentClass= id 
    }
  }
}
</script>
<style lang="scss" scoped>
  .mypack-warp{
      width: 100%;
      height: 100%;
      background-color:#f4f6f9;
      position: absolute;
      top: 0;
      z-index: 9;
      .page{
        width: 100%;
        .show{
          width: 95%;
          height: 250px;
          background-color: #5080a6;
          margin:15px auto;
          display: flex;
          flex-direction: column;
          align-items: center;
          border-radius: 10px;
          .balance{
            padding: 20px 0px;
          }
          .totality{
            font-size: 18px;
            color: #fff;
            span{
              position: absolute;
              right: 40px;
              font-size: 14px;
            }
          }
          .num{
            font-size: 48px;
            color: #CCCC00;
            padding-bottom: 30px;
          }
          .operation{
            width: 100%;
            flex: 1;
            display: flex;
            justify-content:center;
            align-items: center;
            .operationitem{
              flex: 1;
              display: flex;
              flex-direction: column;
              align-items: center;
              li{
                font-size: 18px;
                color: #CCCC00;
                padding: 10px 0px;
              }
              span{
                font-size: 12px;
                color: #ccc;
              }
            }
            .btnbor{
              border-left:2px solid #fff;
              border-right:2px solid #fff;
            }
          }
        }
        .navbar{
          display: flex;
          justify-content: space-around;
         
          li{
            width: 130px;
            height: 30px;
            font-size: 14px;
            color: #746f6f;
            line-height: 30px;
            text-align: center;
          }
        }
      }
      .active{
        border-bottom: 3px solid #095ca0;
      }
  }
</style>